package com.vilen.learn.java7.V3_1;

import com.google.inject.Guice;
import com.google.inject.Injector;

import java.util.List;

/**
 * Created by vilen on 2017/9/23.
 */
public class HollywoodServiceClient {
    public static void main(String[] args) {
        Injector injector = Guice.createInjector(new AgentFinderModule());
        HollywoodServiceGuice hollywoodServiceGuice = injector.getInstance(HollywoodServiceGuice.class);
        List<Agent> agents = hollywoodServiceGuice.getFriendlyAgents();
        for (Agent agent : agents) {
            System.out.println(agent.getType());
        }
    }
}
